<template>
  <div id="page">
    <!-- 准备一级路由坑 -->
    <h2>home page</h2>
    <el-button type="primary" @click="getUser()">用户信息</el-button>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  name: "Home",
  methods:{
      getUser(){
          axios.get('http://localhost:8080/user').then(function(res){
              alert(JSON.stringify(res.data));
          }).catch(function(res){
              alert(res)
          })
      }
  },
  components: {},
};
</script>

<style>

</style>
